Skip to content

Conversation

@Egorand
Copy link

@Egorand Egorand commented Jul 14, 2025

This change makes the properties parameter covariant on T, which allows passing properties of subtypes of T, eliminating the need to cast the test subject to its runtime type to access its properties.

This change makes the properties parameter covariant on T, which
allows passing properties of subtypes of T, eliminating the need
to cast the test subject to its runtime type to access its
properties.
@Egorand Egorand requested review from evant, nishtahir and rf43 as code owners July 14, 2025 09:28
testObject()
).isEqualToIgnoringGivenProperties(
BasicObject(str = "notRarity"),
BasicObject::str,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to the change this would fail to compile, since at compilation time T == TestObject, so the method only allows passing properties of TestObject and not its subclasses.

@larissabenevides
Copy link

🎉 Snyk checks have passed. No issues have been found so far.

code/snyk check is complete. No issues have been found. (View Details)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants